#pragma once
#ifndef MESH__EDITOR__FACING__DIR__HH__
#define MESH__EDITOR__FACING__DIR__HH__

#include <OgrePrerequisites.h>
#include <OgreManualObject.h>
#include <OgreSceneManager.h>
#include <OgreSceneNode.h>
#include <LitPrerequisites.h>

namespace Lit
{
	namespace Editor
	{
		class MeshFacingDir
		{
			Ogre::ManualObject *	mObject;
			Ogre::SceneNode *		mNode;
			Ogre::SceneManager *	mScene;
			Ogre::Real				mLength;
			Lit::Vec3				mDir;
			bool					mRootNode;
		public:
			MeshFacingDir( Ogre::Real length, Ogre::SceneManager * mgr, Ogre::SceneNode * parent = NULL );
			~MeshFacingDir( );

			Lit::Real getLength() const;
			void setLength( Lit::Real length, bool _rebuild = true );

			Ogre::SceneNode* getSceneNode();
			Ogre::SceneManager * getSceneManager();
			Ogre::ManualObject * getManualObject();

			const Ogre::SceneNode* getSceneNode() const;
			const Ogre::SceneManager * getSceneManager() const;
			const Ogre::ManualObject * getManualObject() const;

			const Lit::Vec3& getDirection() const;
			void setDirection( const Lit::Vec3 &dir, bool rebuild = true );

			void rebuild();
			void destroy();
		};
	};
};

#endif